package com.xgd.phylw.controller;

import com.xgd.phylw.bean.Member;
import com.xgd.phylw.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.SessionAttribute;

//movie.jsp 页面内iframe页面跳转以及数据显示
@Controller
public class FrontPageIframeController {

    @Autowired
    private UserService userService;
    //myMess.jsp 页面跳转以及数据显示
    @RequestMapping("Myxx")
    public String PageChangeToMyxx( @SessionAttribute("user") Member name,Model model){
        model.addAttribute("man",userService.queryMember(name));
        return "my-xx";
    }
    //myMess.jsp 页面跳转以及数据显示
    @RequestMapping("Mymovie")
    public String PageChangeToMymovie(Model model){
        return "my-movie";
    }
    //myMess.jsp 页面跳转以及数据显示
    @RequestMapping("Myvip")
    public String PageChangeToMyvip(Model model){
        return "my-vip";
    }
    @RequestMapping("Myvip2")
    public String PageChangeToMyvip2(Model model){
        return "my-vip2";
    }

    //跳转聊天信息
    @RequestMapping("MessageConter")
    public String MessageConter(String message,Model model){
        System.out.println(message);
        model.addAttribute("userMessage",message);
        return "message-conter";
    }
}
